#ifndef DBUTIL_H
#define DBUTIL_H
#include <QSqlDatabase>
#include <QSqlTableModel>
#include <QSqlRecord>

#include <QDebug>
#include "config.h"
/**
 * @brief The DBUtil class
 * mysql操作工具类
 */
class DBUtil
{
private:
    QSqlDatabase db;
public:
    DBUtil(DBInfo *dbInfo);
    int connect();
    QList<QMap<QString,QVariant>> query(QString table,QString filterStr);
    void insert(QList<QMap<QString,QObject>> data);

};

#endif // DBUTIL_H
